package com.feizi.service.impl;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import com.feizi.entity.PdTypeEntity;
import com.feizi.entity.Product;
import com.feizi.entity.ProductVO;
import com.feizi.mapper.ProductMapper;
import com.feizi.service.ProductService;



@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductMapper productMapper;
	@Override
	public List<Product> find(ProductVO productVO) {
		// TODO Auto-generated method stub
		return productMapper.find(productVO);
	}

	@Override
	public int getCount(ProductVO productVO) {
		// TODO Auto-generated method stub
		return productMapper.getCount(productVO);
	}

	@Override
	public int addProduct(Product product) {
		// TODO Auto-generated method stub
		return productMapper.addProduct(product);
	}

	@Override
	public int deleteProduct(Integer id) {
		// TODO Auto-generated method stub
		return productMapper.deleteProduct(id);
	}

	@Override
	public int editProduct(Product product) {
		// TODO Auto-generated method stub
		return productMapper.editProduct(product);
	}

	

	@Override
	public List<PdTypeEntity> findType() {
		// TODO Auto-generated method stub
		return productMapper.findType();
	}

	

	@Override
	public int updateProductImg(Product product) {
		// TODO Auto-generated method stub
		return productMapper.updateProductImg(product);
	}

	@Override
	public int uploadImg(MultipartFile file, String pid, HttpSession session) {
		// TODO Auto-generated method stub
		return productMapper.uploadImg(file, pid, session);
	}

	@Override
	public int getOrder(int id) {
		// TODO Auto-generated method stub
		return productMapper.getOrder(id);
	}

	@Override
	public int upputaway(Product product) {
		// TODO Auto-generated method stub
		return productMapper.upputaway(product);
	}

	@Override
	public int upisDel(Product product) {
		// TODO Auto-generated method stub
		return productMapper.upisDel(product);
	}

	@Override
	public int uprecommend(Product product) {
		// TODO Auto-generated method stub
		return productMapper.uprecommend(product);
	}

}
